home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-05
/
lanmodm1.zip
/
LASER.BAT
< prev
next >
Wrap
DOS Batch File
|
1990-04-02
|
3KB
|
59 lines
REM LASER.BAT Sample Batch file to use with serial printers, plotters, etc.
REM The next command should be run on the computer which will run the
REM printer, and the port number and driver name are examples only.
REM MCOM 1 COMM10
REM
REM The remaining commands are run on the computer which is sending output
REM or receiving input from the shared device.
REM
REM This command installs the INT14 interface program NETDEV.COM.
NETDEV
REM
REM This command tells NETDEV to start its search at device COMM10.
REM The name should be changed if MCOM is set up with a different name.
NETDEV /START=10
REM
REM This command opens the connection between the computer wishing to share
REM the device and the computer connected to the device.
NETDEV /OPEN
REM
REM This command uses the DOS MODE program to set the bit speed and other
REM serial parameters before the program using the shared device is started.
MODE COM1:9600,N,8,1
REM The P option may need to be used if the device uses handshaking. It causes
REM a busy condition to be retried. Otherwise DOS will give a 'Write Error'
REM message.
REM MODE COM1:9600,N,8,1,P
REM
REM This command causes any parallel port data to be sent to the NETDEV program
REM and hence the shared serial device. It is not needed if your program
REM is always set up to print to the serial port COM1:
MODE LPT1:=COM1:
REM
REM Here you would insert the command to run the program which is to use the
REM shared device. Optionally you can break this batch file in half here and
REM call the first part 'SHAREOPN' or something similar, and the second part
REM 'SHARECLS' to denote Shared Open and Shared Close batch files. Normally
REM this file will be edited by you for your needs and given a descriptive
REM name based upon its intended use. You can also print directly from DOS
REM using redirection or with the PRINT command.
REM
REM When use of the device is no longer needed, the connection should be
REM closed. Anytime MODE is used to redirect the printer port it is recom-
REM mended that the following command be used to cancel the redirection.
MODE LPT1:
REM
REM Anytime MODE is used to wait for retries (by setting serial parameters
REM and specifying the P option) it is recommended that the following
REM command be used to cancel retry operation.
MODE COM1:9600,N,8,1
REM
REM This command closes the connection between the computer sharing the device
REM and the device itself. It should be used when the current user is finished
REM with the shared device so that others can use it.
REM NETDEV /CLOSE
REM
REM Since NETDEV will install to a computer once only, this batch file can be
REM repeatedly executed when using a shared device with a program.